import request from '@/utils/request'

// 查询学校列表(不分页)
export function listSchool(query) {
  return request({
    url: '/school/schoolAll',
    method: 'get',
    params: query
  })
}

// 查询学校列表（分页）
export function listSchoolByPage(query) {
  return request({
    url: '/school/page',
    method: 'get',
    params: query
  })
}


// 创建学校
export function addSchool(data) {
  return request({
    url: '/school/build',
    method: 'post',
    data: data
  })
}

// 删除学校
export function delSchool(query) {
  return request({
    url: '/school/delete',
    method: 'delete',
    params: query
  })
}

// 根据ID查询学校
export function getSchoolById(data) {
  return request({
    url: '/school/build',
    method: 'post',
    data: data
  })
}